package android.support.v4.a;

import java.io.PrintWriter;

public final class a
{
  int a;
  b b;
  boolean c;
  boolean d;
  boolean e;
  boolean f;

  public final void a()
  {
    this.c = true;
    this.e = false;
    this.d = false;
  }

  public final void a(int paramInt, b paramb)
  {
    if (this.b != null)
      throw new IllegalStateException("There is already a listener registered");
    this.b = paramb;
    this.a = paramInt;
  }

  public final void a(b paramb)
  {
    if (this.b == null)
      throw new IllegalStateException("No listener register");
    if (this.b != paramb)
      throw new IllegalArgumentException("Attempting to unregister the wrong listener");
    this.b = null;
  }

  public final void a(String paramString, PrintWriter paramPrintWriter)
  {
    paramPrintWriter.print(paramString);
    paramPrintWriter.print("mId=");
    paramPrintWriter.print(this.a);
    paramPrintWriter.print(" mListener=");
    paramPrintWriter.println(this.b);
    paramPrintWriter.print(paramString);
    paramPrintWriter.print("mStarted=");
    paramPrintWriter.print(this.c);
    paramPrintWriter.print(" mContentChanged=");
    paramPrintWriter.print(this.f);
    paramPrintWriter.print(" mAbandoned=");
    paramPrintWriter.print(this.d);
    paramPrintWriter.print(" mReset=");
    paramPrintWriter.println(this.e);
  }

  public final void b()
  {
    this.c = false;
  }

  public final void c()
  {
    this.e = true;
    this.c = false;
    this.d = false;
    this.f = false;
  }

  public final String toString()
  {
    StringBuilder localStringBuilder = new StringBuilder(64);
    android.support.v4.c.a.a(this, localStringBuilder);
    localStringBuilder.append(" id=");
    localStringBuilder.append(this.a);
    localStringBuilder.append("}");
    return localStringBuilder.toString();
  }
}